-
-
Notifications
You must be signed in to change notification settings - Fork 58
feat: Replace time-based log debouncing with content-based event throttling #2479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add ILogThrottler interface and ContentBasedThrottler implementation - Throttle only LogError and LogException events (not breadcrumbs/structured logs) - Use message + stacktrace fingerprinting to deduplicate repeated errors - Add configuration via Editor window (Enable Event Throttling checkbox + Dedupe Window) - Remove old TimeDebounceBase and related classes - Update integrations to use new throttler Closes #2004
|
|
been following along on this for awhile and am very excited to see it so close! minor thing: does |
Excellent point. I renamed it to |
| var throttler = new ContentBasedThrottler(TimeSpan.FromSeconds(10)); | ||
| var message = "test message"; | ||
|
|
||
| var result1 = throttler.ShouldCapture(message, "stacktrace", LogType.Log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need to also handle logs? Or make it configurable, for cases where a repeated log in game thread could be spamming a lot?
Closes #2004
Problem Statement
The existing time-based log debouncing system throttles events purely based on time intervals per log type. This approach has limitations:
Proposal
Replace time-based debouncing with content-based event throttling that deduplicates based on the actual error content (message + stacktrace fingerprint). This ensures:
Implementation
The new throttling system has the following elements
IErrorEventThrottlerinterface - Abstraction allowing custom throttling implementations via options.SetErrorEventThrottler()ContentBasedThrottler- Default implementation using message + stacktrace fingerprinting with a configurable dedupe window (default: 1000ms)